Integrand size = 21, antiderivative size = 59 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {\left (a^2+2 b^2\right ) \text {arctanh}(\cos (e+f x))}{2 f}-\frac {2 a b \cot (e+f x)}{f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f} \]
Leaf count is larger than twice the leaf count of optimal. \(133\) vs. \(2(59)=118\).
Time = 0.75 (sec) , antiderivative size = 133, normalized size of antiderivative = 2.25 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {-8 a b \cot \left (\frac {1}{2} (e+f x)\right )-a^2 \csc ^2\left (\frac {1}{2} (e+f x)\right )-4 a^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-8 b^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+4 a^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+8 b^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+a^2 \sec ^2\left (\frac {1}{2} (e+f x)\right )+8 a b \tan \left (\frac {1}{2} (e+f x)\right )}{8 f} \]
(-8*a*b*Cot[(e + f*x)/2] - a^2*Csc[(e + f*x)/2]^2 - 4*a^2*Log[Cos[(e + f*x )/2]] - 8*b^2*Log[Cos[(e + f*x)/2]] + 4*a^2*Log[Sin[(e + f*x)/2]] + 8*b^2* Log[Sin[(e + f*x)/2]] + a^2*Sec[(e + f*x)/2]^2 + 8*a*b*Tan[(e + f*x)/2])/( 8*f)
Time = 0.40 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3268, 3042, 3491, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (e+f x))^2}{\sin (e+f x)^3}dx\) |
\(\Big \downarrow \) 3268 |
\(\displaystyle \int \csc ^3(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right )dx+2 a b \int \csc ^2(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^2+b^2 \sin (e+f x)^2}{\sin (e+f x)^3}dx+2 a b \int \csc (e+f x)^2dx\) |
\(\Big \downarrow \) 3491 |
\(\displaystyle \frac {1}{2} \left (a^2+2 b^2\right ) \int \csc (e+f x)dx+2 a b \int \csc (e+f x)^2dx-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (a^2+2 b^2\right ) \int \csc (e+f x)dx+2 a b \int \csc (e+f x)^2dx-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{2} \left (a^2+2 b^2\right ) \int \csc (e+f x)dx-\frac {2 a b \int 1d\cot (e+f x)}{f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{2} \left (a^2+2 b^2\right ) \int \csc (e+f x)dx-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}-\frac {2 a b \cot (e+f x)}{f}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\left (a^2+2 b^2\right ) \text {arctanh}(\cos (e+f x))}{2 f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}-\frac {2 a b \cot (e+f x)}{f}\) |
-1/2*((a^2 + 2*b^2)*ArcTanh[Cos[e + f*x]])/f - (2*a*b*Cot[e + f*x])/f - (a ^2*Cot[e + f*x]*Csc[e + f*x])/(2*f)
3.2.63.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)])^2, x_Symbol] :> Simp[2*c*(d/b) Int[(b*Sin[e + f*x])^(m + 1), x], x] + Int[(b*Sin[e + f*x])^m*(c^2 + d^2*Sin[e + f*x]^2), x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x _)]^2), x_Symbol] :> Simp[A*Cos[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Simp[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)) Int[(b*Sin[e + f* x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.39 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{2}\right )-2 a b \cot \left (f x +e \right )+b^{2} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{f}\) | \(73\) |
default | \(\frac {a^{2} \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{2}\right )-2 a b \cot \left (f x +e \right )+b^{2} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{f}\) | \(73\) |
parallelrisch | \(\frac {\left (4 a^{2}+8 b^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-a \left (-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\cot \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\cot \left (\frac {f x}{2}+\frac {e}{2}\right ) a +a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+8 b \right )}{8 f}\) | \(79\) |
risch | \(-\frac {i a \left (i a \,{\mathrm e}^{3 i \left (f x +e \right )}+i a \,{\mathrm e}^{i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}-4 b \right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{2 f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b^{2}}{f}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{2 f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b^{2}}{f}\) | \(143\) |
norman | \(\frac {\frac {a b \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {a^{2}}{8 f}+\frac {a^{2} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 f}-\frac {a^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {a^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {a b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {a b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) | \(187\) |
1/f*(a^2*(-1/2*csc(f*x+e)*cot(f*x+e)+1/2*ln(-cot(f*x+e)+csc(f*x+e)))-2*a*b *cot(f*x+e)+b^2*ln(-cot(f*x+e)+csc(f*x+e)))
Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (55) = 110\).
Time = 0.31 (sec) , antiderivative size = 129, normalized size of antiderivative = 2.19 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {8 \, a b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \, a^{2} \cos \left (f x + e\right ) - {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \]
1/4*(8*a*b*cos(f*x + e)*sin(f*x + e) + 2*a^2*cos(f*x + e) - ((a^2 + 2*b^2) *cos(f*x + e)^2 - a^2 - 2*b^2)*log(1/2*cos(f*x + e) + 1/2) + ((a^2 + 2*b^2 )*cos(f*x + e)^2 - a^2 - 2*b^2)*log(-1/2*cos(f*x + e) + 1/2))/(f*cos(f*x + e)^2 - f)
\[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc ^{3}{\left (e + f x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.51 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^{2} {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{2} {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {8 \, a b}{\tan \left (f x + e\right )}}{4 \, f} \]
1/4*(a^2*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + lo g(cos(f*x + e) - 1)) - 2*b^2*(log(cos(f*x + e) + 1) - log(cos(f*x + e) - 1 )) - 8*a*b/tan(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 118 vs. \(2 (55) = 110\).
Time = 0.32 (sec) , antiderivative size = 118, normalized size of antiderivative = 2.00 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 8 \, a b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 4 \, {\left (a^{2} + 2 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) - \frac {6 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 12 \, b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 8 \, a b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a^{2}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}}{8 \, f} \]
1/8*(a^2*tan(1/2*f*x + 1/2*e)^2 + 8*a*b*tan(1/2*f*x + 1/2*e) + 4*(a^2 + 2* b^2)*log(abs(tan(1/2*f*x + 1/2*e))) - (6*a^2*tan(1/2*f*x + 1/2*e)^2 + 12*b ^2*tan(1/2*f*x + 1/2*e)^2 + 8*a*b*tan(1/2*f*x + 1/2*e) + a^2)/tan(1/2*f*x + 1/2*e)^2)/f
Time = 6.50 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.56 \[ \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (\frac {a^2}{2}+b^2\right )}{f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a^2}{8}+b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a\right )}{f}+\frac {a\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f} \]